﻿using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace Models
{
    public class Users
    {
        [Key]
 
        public int Id { set; get; }

        [Required(ErrorMessage = "Required field Login")]
        [Display(Name = "Login")]
        [MaxLength(50)]
        public string Login { get; set; }

       // [Required(ErrorMessage = "Required field Role")]
        [Display(Name = "Role")]
        public int Role { get; set; }

        [Required(ErrorMessage = "Required field Password")]
        [Display(Name = "Password")]
        [DataType(DataType.Password)]
        [MaxLength(50)]
        public string Pwd { get; set; }

        //[Required(ErrorMessage = "Required field Password confirm")]
        [Display(Name = "Password confirm")]
        [DataType(DataType.Password)]
        //[Compare("Pwd", ErrorMessage = "Passwords do not match")]
        public string ConfirmPwd { get; set; }

       // [Required(ErrorMessage = "Required field Email")]
        [EmailAddressAttribute(ErrorMessage = "Invalid email format")]
        [Display(Name = "Email")]
        [MaxLength(50)]
        public string Email { get; set; }

        public string OnlineOfflineImg { set; get; }
        public string Image { get; set; }

        //[Required(ErrorMessage = "Required field Name")]
        [Display(Name = "Name")]
        [MaxLength(50)]
        public string Name { get; set; }

        [Display(Name = "Family name")]
        [MaxLength(50)]
        public string FName { get; set; }

        [Display(Name = "Middle name")]
        [MaxLength(50)]
        public string MName { get; set; }

    }
}